package com.obra

import com.obra.EnderecoDaObra;

class EnderecoDaObraController {

    def scaffold = EnderecoDaObra
	
	def searchEndereco = {
		if(!params.cep){
			redirect(action:"buscaEndereco", controller:"enderecoDaObra")
			return
		}
		switch (params.cep){
			case "87040-ABC":
			render "CPF Invalido"
			break
			
			case "87040-540":
			return [resposta: "Endereco da Obra X"]
		}
	}
}
